package ru.java2D;

import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * Created with IntelliJ IDEA.
 * User: Admin
 * Date: 04.05.13
 * Time: 20:24
 * To change this template use File | Settings | File Templates.
 */
public class Audio implements Runnable {

    @Override
    public void run(){

        try {
            Player p = new Player(new FileInputStream(getClass().
                    getClassLoader().
                    getResource("DenPobedy.mp3").getPath()));
            p.play();
        } catch (JavaLayerException e) {
            e.printStackTrace();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
